package com.cn.yds.bdy.service;

import com.cn.yds.bdy.dao.model.OptPo;
import com.cn.yds.bdy.dao.model.Topic;
import com.cn.yds.bdy.dao.model.TopicModel;
import com.cn.yds.bdy.vo.ChooseTopicResultVo;
import com.cn.yds.bdy.vo.OptChoiceVo;
import com.cn.yds.bdy.vo.SearchParamVo;
import com.cn.yds.bdy.vo.StudentChoiceVo;
import com.cn.yds.bdy.vo.TeacherChoiceVo;
import org.springframework.data.domain.Page;

import java.util.List;

public interface OptService {



    /**
     * Student choice topics; or Teacher choice students for on topic
     * @param teacherChoiceVo optChoiceVo
     * @return Integer
     */
    Integer teacherChoiceStudents(TeacherChoiceVo teacherChoiceVo);

    /**
     * Teacher update Students for the choice finished topic
     * @param teacherChoiceVo teacherChoiceVo
     * @return Integer
     */
    Integer teacherUpdateStudentsForTopic(TeacherChoiceVo teacherChoiceVo);

    /**
     *  Student delete the topic
     * @param studentChoiceVo optChoiceVo
     * @return Integer
     */
    Integer studentDeleteTopic(StudentChoiceVo studentChoiceVo);

    /**
     *
     * @param teacherId teacherId
     * @param opinion  opinion : 1 is agree, -1 is disagree，0 is deciding
     * @return List<TopicModel>
     */
    List<TopicModel> getTopicByTeacherIdAndOpinion(Integer teacherId,Integer opinion);

    /**
     *
     * @param searchParamVo searchParamVo
     * @return List<TopicModel>
     */
    Page<Topic> getSelectedTopics(SearchParamVo searchParamVo);

    /**
     * Student choice topics
     * @param studentChoiceVo studentChoiceVo
     * @return Integer
     */
    ChooseTopicResultVo studentChoiceTopic(StudentChoiceVo studentChoiceVo);

    /**
     * 验证选课权限
     * @param studentId Integer
     * @return 0：已经被老师选中，1: 可以选课； 2：已选满三门课程
     */
    Integer validateChooseAuth(Integer studentId);

}
